Fix a bug that would lose main pane counts when changing window counts.

Closes #25