Fixed bad version check