Possible fix for singleton/prototype issue