Program does what it should. I have no idea whats wrong?