Fixing scm_guard bug