Fix #583

Note that this fix is not verified as none of the developers have the
means to test it.