fix buffer/string inputs