Fixes #46 Thanks @filitchp