Cherrypicking various custom extension fixes to 1.0.2