Fixed append vs extend in handler registration code