fixed button no command crash

made cursor speed math easier to read