fixing bugs in scm module