fixes #568
fixes #574