regulateCamera method bug fix 2