laywer tests and fixes