un-indent, add missing endif