Fixes #123, fixes #124