Fix missing end keyword