Fix some changes which got reverted during all the merging between different branches. This puts back the sensible version check that Rory implemented