AE: Some more coverity fixes this time for ActiveAE

These are some straight forward fixes. The PA fixes are more advanced but my own code so verified and fixed. @FernetMenta there are more sever issues found by coverity we need to talk about :-)