fixes #499
fixes #711