Merge PR from @Hoolean manually. Closes #1