fixing crash when user modifies model with wrong syntax