added more stuff to control fails