Dirty patch for bug. See commit