Fix bug in firebase limit