Reverted a few changes in sp_util.h as they caused build errors.