Fixing scaleCheck bug

It should exit with the scale code, not echo it.