fixed warnings about removing db connections