fix failure on null