Fixes speed calculation