Some fixes on custom events