Fixed bug with callback and multiple callback functions functin