bugfix: enum may be null