layouts and bug fixes