Fixed scope references
Fixed bad global declaration of model/collection sync