fix bug in views