Included changes I forgot from the previous commit
Fixes #47