Sometimes one of the wheels on the belt sensor comes adrift and causes the problem you mention.
Often you can solve it by just replacing the belt sensor but you need to check the three little sensors on the PCB to make sure they are not damaged if one of them is damaged you need to replace the PCB as well.
Remove the PCB and turn it over to see the three little things I mean where the wheel has touched them.