Backport script changes from 1.3 for admin support