Tests fixes #3 fixes #4 fixes #8