Added fix 1 for bug #43 in dev branch