Fixed encryption bug in xml database