bugfixes: fixes #14, fixes #15