fixes callback function calls