Fixes a bug mentioned in #29