add resample
fix replace scene bug