fix for #381 squashed/cleaned.