Bugfix in gaze handler and add debug printout