Scoping problem made add album functionality behave badly