Fix a few simple bugs and more dbug output.

Change-Id: I0bebb6cb552299dcd848f8fec206126e209487b1
Signed-off-by: Scott Mann <smann@noironetworks.com>