More changes to make production mode work