Layout bug fixes