Add work around and error checking for strncpy bug.