Update to match Cortex updates.

@tedschmidt Could you merge? This should work with the latest version of Cortex.