remove cast warnings on threads plugin