Direction fix, speed calculation fix