fixes #2877

This is for 2.5