Maybe fix AMAT calculation