Fix logging with ghosts