Fixes to dynamic handler invocation