fix a bug and fix the view