added panic catch; changed postresql driver