Function binding bug fixed