Fixes #129 and Fixes #149