fixes #1164
fixes #1532