Parsing string now takes into account buffer limit