Updated screenshot logic.