fix the view page bugs