Fixing bug in parent filtering.