Problem with Serial1 buffer

I fixed my issue by storing it in a String variable and then using it at the end of the line, instead of trying to process every single character as they would be coming.