Fix "Uncaught ReferenceError: callback is not defined"