Minor catalog bug and fixed code from making unwanted db connection when already open.