Fixed a bug where the wrong version was queried