Restored changes e026682e75 & 9211e10588 (lost at 39d6528796)