Removed an extra endif