This should go before everything else is set.