Tests and Fixes #149