OK, AppendMatrix is finally working. Also fixed bug with module counter.