fix ERR offset is too big on mac