fixing a bug