Now working, setting prio sometimes deadlocks