fixed a bug related to references to the same selector