Fix bug in generated version