Simplified so that no null characters are printed