fix chi reference bug