Fix bug in Crystal::activate.
Merge pull request #627 from Morwenn/loop_fix

Fix bug in Crystal::activate.