Fixed bug of calling state after closed pcm