fixes #2640