fixes #5, fixes #6