Minor changes regarding db_con.close()