bug in in_mem