fix bugs in views