fixing a bug with deleting idea