fixed div by zero issue in drawing fields