fix a bug of building views.