Fix from keita, closes #12