fixes #2247