Fix and clean up test