Fix extract script