Fixes #13 (infinite loop)