Better bridge direction detection. #1068