Manually merged in pull request #37. Credits to NiKiZe for the fix.