fix cycle reference bug