fixed a bug in views