Thanks for the feedback, and thanks for playing the game!
Yeah, the game can be buggy because of the way I implemented the boundary check for the boxes. But their appearance is not too frequent, so I figured they could stay as they are.