Hit test bug?

I created a test game to see if some hit test code that I picked up worked. It did mostly except there was a small error, the cube can cut corners when being moved. Does anyone have a solution? Thanks in advance.