grr, remove extra endif