fix to #1059