Fixes to make scripts work after cleaning up.