Fixed bugs in views and roles