Fixes #155 #159