Fix callback factory