Fixup misunderstanding in the db session creation function