fix failure check