properly cast position check