implemented missing session checks, fixing #3