undefined function bug fixed.