Corrected problem with matrix dimensions after conversion