match recent api changes
fix bug which causes failure when no vhosts