fix issue in extract scripts