fix bug with callback