fix view dir bug