Fix inconsistent top and bottom arrays on restoration

- fixes #52