spins only after opening and closing lid

pump runs and drains but will not spin until I lift lid and then close it. Have replaced lid switch. any ideas?

thanks