fix for NULL error in unit tests