Miscellaneous helpers.