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

Pull fix for double issue from other fork