Fixed bug in filter mode where reference was added.