fix error, clean up tests