             return
         }
         if (settings.count != 0) {
-            CDVBMSPush.pushUserId = settings["userId"] as! String
+            CDVBMSPush.sharedInstance.pushUserId = settings["userId"] as! String
         }
         
         CDVBMSPush.sharedInstance.registerCommandDelegate!.runInBackground({
             
-            if CDVBMSPush.pushUserId.isEmpty{
-                BMSPushClient.sharedInstance.registerWithDeviceToken(CDVBMSPush.bmsPushToken) { (response, statusCode, error) -> Void in
+            if CDVBMSPush.sharedInstance.pushUserId.isEmpty{
+                BMSPushClient.sharedInstance.registerWithDeviceToken(CDVBMSPush.sharedInstance.bmsPushToken) { (response, statusCode, error) -> Void in
                     
                     if error.isEmpty {
                         

    }
    
    func didRegisterForRemoteNotifications(deviceToken: NSData) {
        
        if (CDVBMSPush.sharedInstance.registerCallbackId == nil) {
            return
        }
        CDVBMSPush.bmsPushToken = deviceToken;
        registerDeviceAfterTokenRecieve(CDVBMSPush.registerParams)
    }
    
    func didFailToRegisterForRemoteNotifications(error: NSError) {

                        
                        let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAsString: message)
                        // call success callback
                        CDVBMSPush.sharedInstance.registerCommandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
                    }
                    else{
                        
