Fix part of bugs [ bug #766 ]
Merge pull request #744 from FHenry/3.3

Fix part of bugs [ bug #766 ]