Fix bug Done button AddEditPage
Small refactor