fix bug in callback binding