fixed a bug regarding the header