fixed bug where priority is set or checked again