Fixes #5: added more listeners so that the state of the save button should work properly