Changed version check to class check as previous does not work with travis