Fixes #153 and fixes #154