Patches

fix #1821 
fix #1803 
fix #1822 
fix #1778 ??