Lcg/aix

necessary AIX fix and some cleanup