fixed problems described in issue #1 and issue #2

tested with latest cpputest