fix 2 flaws detected by valgrind and bump version to intermediate version