Make zk configuration more robust