fixed camera infinite loop bug