fix header function issue for production