fixing NPE, see https://community.jboss.org/message/654260