Fixed dead camera bug caused by infinite loop.