Cleaned getString from buffer code