fixed bug of references