null-ref exception fix

See https://github.com/Astonex/Antox/issues/365