fixing most dumb error on view query,

but some stuff remains