Fixed callback wrapping bug