Fix use of singleton pattern