fixed this issue with callback