Fix column order and dimensions not being remembered

Reverting commit b259ad9f3c7a4e718449a858a3b3302703f71d4b plus additional changes to fix issue #356
Merge pull request #358 from barijaona/bugfixes

Fix issue #356

tested OK on Snow Leopard and Yosemite