Possible fixes for #999