fixed a bug in the view