Matrix initialization fixed