Merge from @HeyImAlex. resolves #1