Remove unnecessary query

The version check does not require that SQL query