Fixed 'Fatal error: Call to private MyObject::__construct() from invalid context' problem in BasicSession class