fix view bugs