Support functions.