Remove extra `endif`