Fixes gh-6 and fixed gh-2