fixed a problem with camera detection at the transition between 0 and 359 degrees