Fix some bugs caused by bad versioning