Fix for error in saved search menu generation (thanks to vickyshrestha for this one)