Fix for the second part of #2285