fix extraneous `endif'