Fixed wrong emit when piping data through Secure