fix for postgresql restore