Remove not needed endifs