Fix typing and download test failures under poltergeist