Fixed bug error calling method in index.html refresh button