Fixed bug with PsSession