Added check for existence of inner data field
Commented inner attemptEmit function