Fixes bad call to getGoalsByName
sorts and filters plus queries