Fixed various testing bugs regarding thread priority