fixing priority bug