Fix factory reset script