Fixed bug creating ClientSession objects