fixes #71 fixes #73
tests for #71 and #73