Bug fixes on catalog creation script.