corrected camera input handler