fix JPS goal detection