NumberFormatException bug fix