Fix updateGoal method and usage of finding in database