Minor updates to the unit test routines to fix tiny bugs