Fixing an issue with setting the callback