Historic commit for v1.14: make script work with other account profiles as well