Fixed some edge case bugs.  Fucking edge cases.  Found a few more edge
case bugs.  Gotta fix 'em all.

Signed-off-by: Robert Straitt <rstr5105@gmail.com>