fixing endif