Fix minor bugs (must use session)!