fix upper boundary