Improve APE 5 and APE 6