fixing select * scenario