improve firmware string parsing