r332 fix issue 114 and issue 119