fixed npe on debug logging
Merge branch 'master' into dev