fixes #727
fixes #725
fixes #726
work on #684