add lock to counter in showAsThumb