fixed schedule function not updating styles and also fixed back button gone on browser refresh