fix in-memory server bugs