fixes #3124 please test

Please make sure this makes it into master as well.