Change initialization to make session work.

Fixes #216.