fixed test failure with nullreference checks