fixed modal

It wasn't updating properly and didn't update on closing properly. It
should all work to code now