fix possible npe if output device is not initialized