Fixes for #2236

Fixes for #2236