I figured it out. Custom components aren’t initializing component variables when they are not located on the first page. The workaround I did was to create a function that sets all variables to their initial state.