Possible fix for missing OUTPUT_MODE, thanks to narutofanxxxll