And unlike a fix I previously did, this one is perfect. Rather than fiddling with ssx and ssy, I just added some new variables, smx and smy.