small fix for division by zero problem