fix missing end (syntax error)