Fixed Matrix bug
Fixed matrix bug