fix detection of 2 dimensional arrays, fix AccountFreeMarging insert condition