Fixed bug in ptilde

Accitdently it could happened that p was moved to the same state