Bug fix for #38