Bring Hai's fork up to date