Fix issues noted by Euan Harris on PR#465

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>