Fix bug where version would be forgotten