debug output improved
Merge branch 'master' into stable-0.4