fix reference cannot add bug