memset was not done on proper address