fix bug introduced in 338bf595078d0a7e52c70edd93f7b866dd00d314
this fixes #365