Fix REST handler