fixing amp typo and indexing bug