Improve reliability of screenshot detection