The sharedInstance variable should not be set before init is called. Otherwise the init will return nil.