fix issues with callbacks