Fixed case where database would not connect