Fix callback function