fixing layouts and controller