Improved Last Activity logic