Automatic stapling machine