Code review comments from @ondrejhanslik.