clean up as errors in prepare