bugfixes and magicsquare save and load