Corrected the nchar line