Fixes #2. No extra locking needed.