Fixes related to commit 90d12ec3fdef380ec609b73a16ec198600408f1b