fixed bad session check in