optimizing some checks in vmload