Fixes a bug in quote_str()