fixing Francisco's PR

Original PR: https://github.com/hornetq/hornetq/pull/1054