fixing a bug in meta grabbing code