fix bug of callbacks