Dirty fix for the bug in #ids.prev()