dishwasher keeps filling after cycle is done

My bosch dishwasher keeps filling up with water after the run cycle is complete and will run out when the door is opened. We now shut the water off every time its done running to keep this from happening. Everything else works good. Any ideas as to what could cause this?