Updating closed status of accordion