fixes random postgres errors