layout bug fixes