API: fixed getPosition() for cases when me.flag is undefined.