Fix after postgres crash