fixed speed calculation error