Various catalog bug fixes and small improvements