Some more bug fixing.