Fixed endif termination error