CLOUDSTACK-2865: fix error in prepareStop