fixed bug with empty header.