Improved screenshot detection