Fixes problem with html automatic reloading