Fixing deadlock and thread-safety issues in handlers

I think this should be prefixed with '_', since it is not really public API (it's more analogous to a protected method).