Added missing div/0 check