fixes #1, #2