Major bugfixes

generates catalog correctly now