fix view crash