remove possible null vertices