Click event handler for save button was not attached properly