Relocate step output and fix distance updating