Your blocks look OK as far as the logic goes, but what you are seeing is a common problem whein one sprite is dragged over another one.
They lock together and only one will show on top but the other is being dragged underneath.
One name for this is sprite cannibalism and you can correct for this in a few different ways.
I have one solution you might use in
this video. There is also a description
here.
---
sf