Fixes #1087 , Fixes #818