Fix agent sensor detection of horizontal/vertical lines