Fixes #6, #4