[FIX] fixed samcat and sam2matrix