Use the correct origin for detecting slot positions. Fixes #42