Prevent duplicate titles

Fixes #17.