fix signatures and a bug in Singleton