Fixed NPE bug with JMS headers