fix build error from trailing endif