Fixed bug that caused max speed to always be 0.