HORNETQ-1437 and HORNETQ-1430

Fixes for HORNETQ-1437 and HORNETQ-1430