fixed a bug in priv changing.