fixed bug in calculating status