send headers correctly