fixed bug for when analysis fails