fix a bug introduced in 6a914e66d02, see #903