some smart quote handling