fixed fail logic