fixed key change bug