fix quality string length bug