Fix bug in calling of requirejs callbacks.