Fixes #4, fixes #5