fix incorrect updating of camera matrix