fixed endif clause