fix double free bug, mem flags can now be represented as symbols