fix reference error issue #30