CLOUDIFY-2180 Fixed NPE on close()