fix bug for view setting