CLOUDIFY-2507 fix prepanding logic