fix fail functions