Make singleton more robust

It should allow to create multiple instances according to the arguments for __init__.