Fixes #13

Maybe this should also be extracted.