fix issue #18 thanks to @Maz