Fix a null reference exception if no callback is being waited for