overflow removal;max OD added;other small fixes