adds tests for #442, fixes #441