added an automatic refresh request and fixed static analysis issues