Fixed lua error caused by wrong function reference.