Fix events factory