bug fixes after extract from Siebel