need maytag dishwasher help

I have a maytag dishwasher that runs through cycles properly, but when it comes to last rinse(I think) the pump or motor just keeps running. It drains all the water but does not stop running and go to the dry cycle. Is the pump/motor shot or something else???