Fix error in add()

Model not loaded, variable not declared in correct scope