With help of the screens 😄 I realized that I had forgotten that the y coordinate is reversed, and that x cannot be negative. Fixed these issues and added a conversion function to switch between local and remote coordinates