Fixes to after_id & before_id