fix problems in catalog controllers, add more tests