Fixed bugs related to expanding goals