modals close and page reloads when values are updated