fixed some errors in controllers, and display in layout