Update dependencies and and make thread and speed checks more robust.