Revert rest.c to fab1da6