fix the main layout