Some fixes
Merge commit 'da16fcd999029d3ab296ca5df3e224db1c6d46a0'