Fix bug using the wrong callback