fix version setting code
fix tests to match schema changes; fix version issues