Solved bug with contiguous property at matrix