fixes #167, fixes #168