changed distance_to_action. Is now more reliable, but still sucks.