bugfix for #118 applied incorrectly