fix bugs that task does not swith priority