fixed catching of header string