Fix database environment settings