Fixed the problem of creation of matrix when using the button create surface