fix duplicate callback invocation