fixed bug in updatelastchecked