#6: Rework fix to avoid race conditions associated with redefining handlers