Bug fixes

Bug corrected in b46353 were re-introduced in 951045.