fixed bug when restricting some columns