Changed how the sprite's speed is managed.