Fixing thread priorities bug.