fix bug for navigation bar layout.