Place a small piece of tape or a thin foam pad on the underside of the scanner cover right above that pin. This adds extra push when closed.
The XP-313 uses a small near the right hinge to detect if the scanner unit is closed. adjustment program epson xp 313 top