add offset check in vfunc.