Made refresh button work