tolerate null callback, fixes #40