Fixed some issues with callbacks