Simple patch for this issue, not sure if the best.