Fixes #14, fixes #34