sc: fix wrong indexing