Fixes autolathe checking wrong value

Fixes #2415