fixes #3, #4