Fix modal hide problem

Fixes #292

Now you invest until you want to hide the modal by clicking the x. It was weird to hide it every time anyway.