Fixed part 1 of issue #127