Fix application layout bug