fix vs compile bugs