fix delete raw and clean up