fixed the remove goal function