Fixed the Segmentation Fault and the misundertanting of string.end() and string.size()