Fixes #5.
Merge pull request #2 from Ziem/patch-doubletypes

Pull fix for double issue from other fork