Added preventing accidental closure of page

- Closed #40
- Thanks @amarinelli