L293d reverse current protection

Dear viewer,
I'm using L293d motor driver ic to control 12 v toy motor, it's working but it have some noises always it is turning both side.

while sensor is sensing it is not running but if once sensor senses means it it is randomly running,even sensor not sensing anything again. is it happening because of reverse current, can you help me to protect it.