Fixed onKeyUp function.