null ref fix
Signed-off-by: duketwo <duketwoqq@gmail.com>