Bug fix for #37