fix for #645

Please review my fix for #645