fix a window resize bug that made iTerm (with its monospace grid based window size) get stuck at certain sizes