Fix a few bugs related to #623

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>