Fixed most unit tests