Fixed a looping error that could cause misplaced arrows.