fixed mykey generation bug