removing ghosts