fixed a few errors, session is still a problem