Releasing the mouse when it's out the window seems fine, but the code I wrote says that you can only initiate the impulse when the box is colliding with the world (not best design), that could explain why the clicks doesn't work sometimes, I'll look further into this to make the game better, thank you!