Common functions.