Fixed a bug causing the wrong shift to be registered in coordinate