fix code to comply with updated singleton implementation