fix argument passing to callback