               callback null, true
 
   verifyNewToken: (token, callback=->) =>
-    hashedToken = @_hashToken token
+    try
+      hashedToken = @_hashToken token
+    catch error
+      return callback error
+
     @devices.findOne uuid: @uuid, "meshblu.tokens.#{hashedToken}": {$exists: true}, (error, device) =>
       return callback error if error?
       callback null, !!device

    @devices.findOne uuid: @uuid, (error, data) =>
      return callback error if error?
      delete data.meshblu.hash if data?.meshblu?.hash
      params = $set :
        'meshblu.hash': @_hashToken JSON.stringify(data)
      debug 'updating hash', @uuid, params
      @devices.update uuid: @uuid, params, callback


    @fetch (error, attributes) =>
      return callback error if error?

      try
        hashedToken = @_hashToken token
      catch error
        return callback error

      @update $unset : {"meshblu.tokens.#{hashedToken}"}, callback

  verifyToken: (token, callback=->) =>
