Fixes set traversing bug