Added fix from issue 77