removing extraneous `endif'