Start by reinstalling the M513 mouse drivers.
Download via Marvo's website, manually reinstall, and reconfigure.
Failing that try another known working mouse on your pc.
Try the M513 on another known working computer.
Determine if the problem follows the M513 mouse or stays with the pc.