fixes #6 fixes #7 fixes #8