matrix directive append row/column and layout issue fixed