make sure we only call the callback once