Manually merging changes, fixes #6