Added fix for CLOUDSTACK-6316

Added changes for CLOUDSTACK-6316.
More details in the bug

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Revert "Added fix for CLOUDSTACK-6316"

This reverts commit 95a645349fc14bb16ea30509a265c2731736b206.
Added fix for CLOUDSTACK-6316

Added changes for CLOUDSTACK-6316.
More details in the bug

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>