fix failure code