Matrix bug fixed (the strange list/ndarray bug!!)