Event added

Prevents user from losing changes when user leaves or refreshes the page