in-memory structure bug fix