fixed a bug with nested enums in libs