Ported changes from old master