better handling on invalid poly chars