adds tests for fix to #39