performance fixes on string ops