89 Fix bugs and test setup