more bug corrections