add bug to tests and refine them