bug fix for switching goals