fixed key up/press/down issue