remove invalid reference