Bugfixes to version handling.