Fix some issues where task priority plugin wouldn't work properly.