CLOUDSTACK-7865: fixed pep8 errors and errors in wrong references
to the variables