fix magic square solution