Fixed version check to be <2.7 compatible