Fix for version check

Should fix #1544