Bug fix for before_id /w limit