[API] Fixed callback handling