fixed bug in model analysis