Fixed bug when leaving browser open for a while