fix ref bug in packagemanagerservice's constructor