updates for https://issues.apache.org/activemq/browse/AMQ-834 and https://issues.apache.org/activemq/browse/AMQ-833