Fixed duplicate error generation -- fixes #12