fix missing end in models