fixed bug with priv check