Fix for #2419.

@jbau please when you have 2 seconds.