fixes #21, fixes #22