fix generic callback bug