You might want to move this into the synchronized block to avoid a race condition, or at least to clarify the concurrency here