corrected \n bug when reading keys