fix view query, remove PTO stuff