various bug fixes

various bug fixes

Signed-off-by: Robert Coscia <coscia@g.harvard.edu>