Fixes for #155 & #160