Fix for intermittent KindError caused by mismatched imports.