Misc utils.