updating the theme demo to prevent a potential race condition