complete fix for bug 1432 and 1433