config before session, fixes #1