Fixed pop state error