Fixed most test errors