fix some compile errors from backport