correct window maximization for 2d data (with merge)