Fixed inverse logic error

Updating the model when it already exists and create a new one if it doesn't.