Backport JCLOUDS-602 to 1.7.x