fix how to call emit