Make undoing minimum size comply with Java specs