fixes #793
fixes #792
fixes #790
fixes #785