set box height to avoid overflow