reforming the loop to put get_next_word to the end, and adding continue clause into the surface reading if. It prevents the losing-last-surface bug becuase when the next usemtl is reached, the loop is continued, and reading another word is skipped. Thus the read_buffer is still usemtl, thus being able to enter the if statement.