Added lock to the camera stop the flashlight from flickering