fix horizontal layout bug