Model fix

@simucal Review and merge