fixes #5, fixes #2