Fixed some bugs in catalog browser script.