Fixed bug with callbacks