Fixed error in case corners not found