made admin scripts robust