Added a change to fix the local variable issue.
CLOUDSTACK-5674: Added few fixes for CLOUDSTACK-5674