fix view all logic