fixed issues with callbacks