added image hiding on failure