fix bug in reading multiple tokens for header and parameter