fixed a division by zero in status function