Fixed fenses & updated tests