Fixed correctness in iodb