Again some changes to make it compatible with aegis.

Now it should be all fine with athena.