I tried what you said SoldjahBoy, but it still either made the sprite jump continuously or not at all.
From what I found, when the sprite gets stuck, its x does not change, so both old and new match, so nothing gets triggered. I did however add a small delay for the oldx so it was out of sync with the current x, which worked.
However you can notice when they get stuck.
I did a little work around which now basically make the sprites float above the platform by 0.9 pixels, now they never get stuck (I shifted the origin down 1 pixel so it does not look like it is floating). If I go above 0.9 then it starts to hop continuously.
So I think what I have will work.