loop fixed

Mean time solution with Thread.sleeps to make it less likely that the
user will remove the card at the wrong time