fix TAM generation