some fixes in AM and texing