fix problem in kx and ky