fix failing tests in master and 1.3
Merge branch 'master' into stable/0.1.x