Fixing return type of getInstance