fixes #4, #6