fixed more functions, added ifdefs for dynamic priority mode