fix for testxy & amptest; improvement of smoother