add missing end stmt