Fixed the algorithm for a better field of vision.