thx a lot to all of you. i solved the problem. the error was the cam.update call bevor any input was done.