Fix singleton initialization.

Fixes #115