Bufgix for UnicodeEncodeError in clean_params