Fixed part one of issue #78