Moved version check up