Partial fixes to the ExposureDBwriter