fixed deprecated singleton issue