fixed a dphi bug