small fix to avoid errors for ghosts