some query changes to reflect bit type changes in db