preventing double scanning