Fix layout problems related to pagination UI elements