Fixes issues brought up in #155