Replace scm detection
Fixes