Removing illegal references.