fix config and expand scripts