Fixed crash on horizontal layout.