Fixed connect to db