Fixes #8

Adds a test and a fix.
Merge branch 'master' of github.com:xuanxu/croupier