I've just tested the code you posted and it works perfectly fine for me. Something else must be wrong.
Of course it works, but the problem is camera is always behind the player as i doesn't remove and i can't move proper, it's shaking.. Try to move and you'll see.