fixed minor bug with callbacks