fix before create listener not being called issue with event emmiter