fix associate key to machine bug