fixing problems with goal == 0