fix crash when callback called more than once

Callbacks should not be called more than once. However if they are, we
can throw out the subsequent calls, rather than crashing the app.