fixed reading key to be read as string instead of 'buffer' object