Remove extra endif