Fix version query problem