Merge pull request #60 from Gaerzi/master

Sync with my fork.
Merge pull request #61 from Gaerzi/master

Sync with my fork.