fixes patch based aam builder