fix expense query