CLOUDIFY-2229 fixed assertions.