fix the head check when checking baseruby, fix #2106