Fixed error when assigned lastID in method lunchQuery