Fixes #9: fix case repeating.