Fix bug, applying patch from Parker.