Fix poltergeist test issue