Restored the session check