fix for newer versions of twisted