Fixes #11
Slightly hacky but cleanest solution for now